/*
 * Copyright (C) 2010-2011 Graz University of Technology, Austria. All Rights reserved. 
 *
 * Contact: Simone Kopeinik <simone.kopeinik@tugraz.at>
 * 	   Graz University of Technology, Knowledge Management Institute, Brückenkopfgasse 1/6, 8020 Graz 	
 * 	   <http://www.kmi.tugraz.at/>
 * 
 * This software is part of the TARGET platform developed by the
 * TARGET EC-funded project www.reachyourtarget.org
 *
 * This software is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * The GNU General Public License is available at <http://www.gnu.org/licenses/>.
 *
 */
package at.tugraz.kmi.css.cbkst2.prereq.config;

import java.util.ArrayList;
import java.util.List;

import at.tugraz.kmi.css.cbkst2.CbKSTCompetence;
import at.tugraz.kmi.css.cbkst2.StructureLoader;
import at.tugraz.kmi.css.cbkst2.prereq.PrerequesiteOrderSetModule;
import at.tugraz.kmi.css.cbkst2.prereq.io.GraphMLSkillStructureIO;
import at.tugraz.kmi.css.cbkst2.prereq.io.IOConfigurationModule;
import at.tugraz.kmi.css.testcommons.AbstractGuiceObjectFactory;

import com.google.inject.AbstractModule;
import com.google.inject.Module;
import com.google.inject.TypeLiteral;

/**
 * Testing Context with GraphML IO loader as default loader.
 * 
 * @author georgo
 * 
 */
public class GraphMLDefaultIOObjectFactory extends AbstractGuiceObjectFactory {

	private static final long	serialVersionUID	= 1L;

	@Override
	protected List<Module> createTestContext() {
		ArrayList<Module> l = new ArrayList<Module>();

		Module ioM = new AbstractModule() {
			@Override
			protected void configure() {
				bind(new TypeLiteral<StructureLoader<CbKSTCompetence>>() {})
						.to(new TypeLiteral<GraphMLSkillStructureIO>() {});

			}
		};
		l.add(ioM);
		l.add(new PrerequesiteOrderSetModule());
		l.add(new IOConfigurationModule());
		return l;
	}

}
